<template>
  <div class="d-paner d-paner-noborder">
    <Article :article="data" :attrs="attrs" />
  </div>
</template>

<script>
import { Article } from '@daelui/vdog/dist/viewer.js'
import { dater } from '@daelui/dogjs/dist/components.js'
import noteSer from '../../service/action/note.action.js'

export default {
  components: {
    Article
  },

  data () {
    return {
      data: {},
      attrs: [
        {key: 'createTime', label: '创建时间'},
        {key: 'updateTime', label: '更新时间'}
      ]
    }
  },

  methods: {

  },

  mounted () {
    let id = this.$route.params.id
    // 查询指定id对就的树形数据
    noteSer.queryItem({ id }).then(res => {
      let item = (res || {}).data || {}
      item.createTime = dater.format(item.createTime)
      item.updateTime = dater.format(item.updateTime)
      this.data = item
    })
  }
}
</script>

<style scoped>
.d-caption-text {
  width: 100%;
}
</style>
